#!/bin/bash
# GPLv3+ see COPYING.GPL
DIR=`ps -af | grep diff | awk -F' ' '{print $11}'`
while sleep 1; do lsof 2>/dev/null | grep diff | grep $DIR  | awk -F' ' '{print $9}' ;  sleep 3; done
